<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
//培训资料
return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('training_materials', function (Blueprint $table) {
            $table->id();
            $table->integer('shop_id')->default(0)->comment('店铺id');
            $table->string('name')->default('')->comment('资料名称');
            $table->string('url')->default('')->comment('资料地址');
            $table->tinyInteger('status')->default(1)->comment('1启用2禁用');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `training_materials` comment '培训资料'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('training_materials');
    }
};
